package com.guyaogg.gulimall.order.feign;

import com.guyaogg.common.to.SkuHasStockVO;
import com.guyaogg.common.utils.R;
import com.guyaogg.common.utils.ToT;
import com.guyaogg.gulimall.order.vo.WareSkuLockVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 顾遥
 */
@FeignClient("gulimall-ware")
public interface WmsFeignService {
    @PostMapping("ware/waresku/hasstock")
    //@RequiresPermissions("ware:waresku:list")
    ToT<List<SkuHasStockVO>> getSkusHasStock(@RequestBody List<Long> skuIds);

    @GetMapping("ware/wareinfo/fare")
    R getFare(@RequestParam("addrId")Long addrId);

    @PostMapping("ware/waresku/lock/order")
    R orderLockStock(@RequestBody WareSkuLockVO vo);
}
